package com.qf.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.util.Date;
import java.io.Serializable;

/**
 * (Goods)实体类
 *
 * @author makejava
 * @since 2020-07-02 10:14:06
 */
public class Goods implements Serializable {
    private static final long serialVersionUID = -70474339634041903L;



    // 查询总数的sql
   // String countSql = "select count(1) from goods g JOIN item i on g.item_id = i.id";



    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @TableField(value ="type")
    private  String type;

    @TableField("num")
    private Integer num;

    @TableField(value ="item_id")
    private Integer itemId;

    @TableField(value ="goods_id")
    private Integer goodsId;

    @TableField(value ="title")
    private String title;

    @TableField(value ="small_pic")
    private String smallPic;

    @TableField(value ="price")
    private Double price;

    @TableField(value ="create_time")
    private Date createTime;

    @TableField(value ="update_time")
    private Date updateTime;
    /**
    * 1表示可用；0表示不可用(软删除)
    */
    @TableField(value ="status")
    private String status;

    @TableField(value ="stock_num")
    private Integer stockNum;

    @TableField(value ="description")

    private String description;

    @Override
    public String toString() {
        return "Goods{" +
                "id=" + id +
                ", itemId=" + itemId +
                ", goodsId=" + goodsId +
                ", title='" + title + '\'' +
                ", smallPic='" + smallPic + '\'' +
                ", price=" + price +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", status='" + status + '\'' +
                ", stockNum=" + stockNum +
                ", description='" + description + '\'' +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getItemId() {
        return itemId;
    }

    public void setItemId(Integer itemId) {
        this.itemId = itemId;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSmallPic() {
        return smallPic;
    }

    public void setSmallPic(String smallPic) {
        this.smallPic = smallPic;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getStockNum() {
        return stockNum;
    }

    public void setStockNum(Integer stockNum) {
        this.stockNum = stockNum;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

}